# encoding=utf-8
import sys
import time
from appium import webdriver
import unittest
from Configure import ForAppParmes
from GeneralFunction.UnitFunction import getScreenShot
reload(sys)
sys.setdefaultencoding('utf-8')
from GeneralFunction.Operation import operation
class Base(unittest.TestCase):
    def setUp(self):
        desired_caps = {
            'platformName': ForAppParmes.platformName,
            'deviceName': ForAppParmes.deviceName,
            'platformVersion': ForAppParmes.platformVersion,
            'appPackage': ForAppParmes.appPackage,
            'appActivity': ForAppParmes.appActivity,
            'unicodeKeyboard': ForAppParmes.unicodeKeyboard,
            'resetKeyboard': ForAppParmes.resetKeyboard
           # 'aut': 'com.shenzhou.tyy_jz:2.3.1'
        }
        self.driver = webdriver.Remote('http://192.168.32.104:4723/wd/hub', desired_caps)
        self.driver.implicitly_wait(30)
    def tearDown(self):
        time.sleep(5)
        getScreenShot(self.driver, "caseEnd")
        self.driver.quit()
if __name__=='__main__':
    unittest.main()